package com.ruoyi.merchant.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.MerchantOperatorLogMapper;
import com.ruoyi.db.domain.MerchantOperatorLog;
import com.ruoyi.merchant.service.IMerchantOperatorLogService;

/**
 * 商户操作明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-09
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class MerchantOperatorLogServiceImpl implements IMerchantOperatorLogService 
{
    @Autowired
    private MerchantOperatorLogMapper merchantOperatorLogMapper;

    /**
     * 查询商户操作明细
     * 
     * @param id 商户操作明细主键
     * @return 商户操作明细
     */
    @Override
    public MerchantOperatorLog selectMerchantOperatorLogById(Long id)
    {
        return merchantOperatorLogMapper.selectMerchantOperatorLogById(id);
    }

    /**
     * 查询商户操作明细列表
     * 
     * @param merchantOperatorLog 商户操作明细
     * @return 商户操作明细
     */
    @Override
    public List<MerchantOperatorLog> selectMerchantOperatorLogList(MerchantOperatorLog merchantOperatorLog)
    {
        return merchantOperatorLogMapper.selectMerchantOperatorLogList(merchantOperatorLog);
    }

    /**
     * 查询商户操作明细列表
     *
     * @param merchantOperatorLog 商户操作明细
     * @return 商户操作明细
     */
    @Override
    public List<Map<String, Object>> selectMerchantOperatorLogMapList(MerchantOperatorLog merchantOperatorLog)
    {
        return merchantOperatorLogMapper.selectMerchantOperatorLogMapList(merchantOperatorLog);
    }

    /**
     * 新增商户操作明细
     * 
     * @param merchantOperatorLog 商户操作明细
     * @return 结果
     */
    @Override
    public int insertMerchantOperatorLog(MerchantOperatorLog merchantOperatorLog)
    {
        merchantOperatorLog.setCreateTime(DateUtils.getNowDate());
        return merchantOperatorLogMapper.insertMerchantOperatorLog(merchantOperatorLog);
    }

    /**
     * 修改商户操作明细
     * 
     * @param merchantOperatorLog 商户操作明细
     * @return 结果
     */
    @Override
    public int updateMerchantOperatorLog(MerchantOperatorLog merchantOperatorLog)
    {
        return merchantOperatorLogMapper.updateMerchantOperatorLog(merchantOperatorLog);
    }

    /**
     * 批量删除商户操作明细
     * 
     * @param ids 需要删除的商户操作明细主键
     * @return 结果
     */
    @Override
    public int deleteMerchantOperatorLogByIds(Long[] ids)
    {
        return merchantOperatorLogMapper.deleteMerchantOperatorLogByIds(ids);
    }

    /**
     * 删除商户操作明细信息
     * 
     * @param id 商户操作明细主键
     * @return 结果
     */
    @Override
    public int deleteMerchantOperatorLogById(Long id)
    {
        return merchantOperatorLogMapper.deleteMerchantOperatorLogById(id);
    }
}
